import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator, TransitionPresets } from '@react-navigation/stack';
import React from 'react';
import {
  SafeAreaView,
  StatusBar,
} from 'react-native';
import Welcome from './src/modules/welcome/Welcome';
import Login from './src/modules/login/Login';
import Home from './src/modules/home/Home';
import MainTab from './src/modules/MainTab/MainTab';

const Stack = createStackNavigator()
function App(): JSX.Element {

  return (
    <SafeAreaView style={{ width: '100%', height: '100%' }}>
      <StatusBar
        barStyle={'dark-content'}
        backgroundColor={'white'}
      />
      <NavigationContainer>
        <Stack.Navigator
          initialRouteName='Welcome'
          screenOptions={{
            cardStyle:{elevation:1}
          }}
        >
          <Stack.Screen
            component={Welcome}
            name='Welcome'
            options={{
              headerShown:false, 
              ...TransitionPresets.SlideFromRightIOS , 
            }}
          />
          <Stack.Screen
            component={Login}
            name='Login'
            options={{
              headerShown:false, 
              ...TransitionPresets.SlideFromRightIOS , 
            }}
          />
          <Stack.Screen
            component={Home}
            name='Home'
            options={{
              headerShown:false, 
              ...TransitionPresets.SlideFromRightIOS , 
            }}
          />
          <Stack.Screen
            component={MainTab}
            name='MainTab'
            options={{
              headerShown:false, 
              ...TransitionPresets.SlideFromRightIOS , 
            }}
          />
        </Stack.Navigator>
      </NavigationContainer>
    </SafeAreaView>
  );
}



export default App;
